import axiosServer from "@/utils/request";


/**
 * 新增鏈接
 * @param type
 * @param name
 * @param route
 * @param illustrate 说明
 * @param version 版本
 * @param updateTime
 * @returns {*}
 */
export const addLink = (type, name, route, illustrate, version, updateTime) => {
    return axiosServer({
        method: "post",
        url: "/link/add",
        data: { type, name, route, illustrate, version, updateTime }
    });
};


/**
 * 刪除鏈接
 */
export const deletLink = (id) => {
    return axiosServer({
        method: "delete",
        url: "/link/delete/" + id,
    });
};

/**
 * 下载链接查看所有
 */
export const getLinkAll = (id) => {
    return axiosServer({
        method: "get",
        url: "/link/findAll",
    });
};
/**
 * 修改是否失效
 * @param id
 * @param lose // true、false
 * @returns {*}
 */
export const updateLose = (id, lose) => {
    return axiosServer({
        method: "post",
        url: "/link/updateLose",
        params: {
            id, lose
        }
    });
};
